package com.gientech.springstream.controller;

import com.gientech.springstream.service.MsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MessageController {

    @Autowired
    private MsgService msgService;
    @GetMapping("/send/{msg}")
    public String sendMsg(@PathVariable("msg") String msg){
        msgService.sendMsg(msg);
        return "sent msg";
    }

}
